<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="filesform">
<div id="com_docario">
    <!-- check breadcrumb option -->
    <div class="breadcrumb">
        <ul>
            <?php if ($this->cid == 0) { ?>
            <li class="uniqueitem">
                <?php echo JText::_('ROOT'); ?>
            </li>
            <?php } else { ?>
            <li class="parentitem linkable">
                <a href="<?php echo JRoute::_('index.php?option=com_docario&view=listport&Itemid='.$this->itemid); ?>">
                    <?php echo JText::_('ROOT'); ?>
                </a>
            </li>
            <li class="separator">&gt;</li>
            <?php } ?>
            <?php for($i = count($this->breadcrumb)-1; $i >= 0; $i--) { ?>
                <li class="breaditem linkable">
                    <a href="<?php echo JRoute::_('index.php?option=com_docario&view=listport&Itemid='.$this->itemid.'&cid='.$this->breadcrumb[$i]->id); ?>">
                        <?php echo $this->breadcrumb[$i]->name; ?>
                    </a>
                </li>
                <li class="separator">&gt;</li>
            <?php } ?>
            <?php if ($this->cid > 0) { ?>
                <li class="actualitem"><?php echo $this->category->name; ?></li>
            <?php } ?>
        </ul>
    </div>
    <div class="toolbar">
    </div>
    <div class="listview">
        <?php foreach($this->categories as $category) { ?>
            <div class="item">
                <div class="category">
                    <a href="<?php echo JRoute::_('index.php?option=com_docario&view=listport&Itemid='.JRequest::getVar('Itemid').'&cid='.$category->id); ?>">
                    <?php echo $category->name; ?>
                    </a>
                </div>
            </div>
        <?php } ?>
        <?php foreach($this->files as $file) { ?>
            <div class="item">
                <div class="file">
                    <div class="file_name">
                        <?php echo $file->name; ?>
                    </div>
                    <div class="file_actions">
                        <a href="javascript:void(0)" class="fileinfo" id="info<?php echo $file->id; ?>" 
                           title="<?php echo JText::_('FILE_INFO'); ?>">
                            <img src="<?php echo ASSETS_IMAGES . DS . 'info.png'; ?>" />
                        </a>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        <?php } ?>
    </div>
</div>
<div class="modalarea hidden"></div>
<div class="dialog modal hidden">
    <div class="header">
        <div class="label">
            <?php echo JText::_('FILE_INFO'); ?>
        </div>
        <div class="actions">
            <a href="javascript:void(0);" class="closedialog">
                <img src="<?php echo ASSETS_IMAGES . DS . 'close.png'; ?>" />
            </a>
        </div>
    </div>
    <div class="clear"></div>
    <div class="content" id="fileinfocontent"></div>
</div>

<input type="hidden" name="view" id="view" value="listport" />
<input type="hidden" name="controller" id="controller" value="file" />
<input type="hidden" name="option" id="option" value="com_docario" />
<input type="hidden" name="Itemid" id="Itemid" 
       value="<?php echo $this->itemid; ?>" />

</form>
